package Map;

//import java.util.HashMap;
import java.util.Map;
import java.util.Random;

public class MapLoader {

	private MapLoader() {

	}

	public static Floor getMap(final Map<String, String> hm) {
		if (hm == null)
			return null;
		LoadAction action = new LoadAction() {
			@Override
			public Floor getMap(Map<String, String> _hm) {

				Floor mapa = new Floor();
				mapa.height = Integer.valueOf(1000);
				mapa.width = Integer.valueOf(1000);
				for(int i=0;i<10;i++){
					Block block = new Block();
					block.height=10;
					block.width=10;
					block.x=20+i*10;
					block.y=20+i*10;
					mapa.getBlocks().add(block);
				}
				

				
				

				return mapa;
			}
		};
		return getMap(hm, action);
	}


	public static Floor getMap(Map<String, String> hm, LoadAction loadAction) {
		if (hm == null)
			return null;
		return loadAction.getMap(hm);
	}
}
